home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.awt;
-
- import java.awt.Image;
-
- public class DefaultData implements Data {
- int row;
- int col;
- DataSource dataSource;
-
- public DefaultData(DataSource ds) {
- this.dataSource = ds;
- }
-
- public void setRowAndCol(int r, int c) {
- this.row = r;
- this.col = c;
- }
-
- public int type() {
- return this.dataSource.type(this.row, this.col);
- }
-
- public boolean isEditable(int row, int col) {
- return this.dataSource.isDataEditable(row, col);
- }
-
- public boolean changed() {
- return false;
- }
-
- public void rollback() {
- }
-
- public void commit() {
- }
-
- public boolean isMasked() {
- return this.dataSource.isMasked(this.row, this.col);
- }
-
- public String getMask() throws TypeNotSupported {
- return this.dataSource.getMask(this.row, this.col);
- }
-
- public boolean supportsChoice() {
- return this.dataSource.supportsChoice(this.row, this.col);
- }
-
- public Data[] getChoices() throws TypeNotSupported {
- return this.dataSource.getChoices(this.row, this.col);
- }
-
- public void setText(String t) {
- this.dataSource.setText(this.row, this.col, t);
- }
-
- public void insertChar(int pos, char c) {
- this.dataSource.insertChar(this.row, this.col, pos, c);
- }
-
- public void setText(char c) {
- this.setText(String.valueOf(c));
- }
-
- public void appendChar(char c) {
- this.dataSource.appendChar(this.row, this.col, c);
- }
-
- public void clearText() {
- this.dataSource.clearText(this.row, this.col);
- }
-
- public void deleteChar(int pos) {
- this.dataSource.deleteChar(this.row, this.col, pos);
- }
-
- public String subString(int spos, int epos) {
- return this.dataSource.subString(this.row, this.col, spos, epos);
- }
-
- public void setImage(Image i) {
- this.dataSource.setImage(this.row, this.col, i);
- }
-
- public String toString() {
- return this.dataSource.toString(this.row, this.col);
- }
-
- public Image toImage() {
- return this.dataSource.toImage(this.row, this.col);
- }
- }
-